<template>
	<!-- :style="{'margin-top':conf.top+'vh',}" -->
	<view class="no-data-view" >
		
		<!-- <image v-if="conf.imgUrl" :style="{width:conf.imgWidth,height:config.imgHeight}" :src="conf.imgUrl?conf.imgUrl:conf.url+'/nodata.png'"></image>
		
		<image v-if="!conf.imgUrl"	class="no-data" :src="conf.url+'/nodata.png'"></image> -->
		
		<!-- :style="{width:conf.imgWidth,height:config.imgHeight}" -->
		<image v-if="conf.imgUrl" 
		style="width:315rpx;height:307rpx"
		
		:src="conf.imgUrl?conf.imgUrl:conf.url+'/collection/noHaveIcon.png'"></image>
		
		<image v-if="!conf.imgUrl"
			style="width:315rpx;height:307rpx"
			class="no-data" :src="conf.url+'/collection/noHaveIcon.png'"></image>
		
		
		
		<!-- <view :style="{color:conf.color,'font-size':conf.fSize,'padding-top':conf.txtTop+'rpx'}">{{conf.content}}</view> -->
	</view>
</template>

<script>
	export default {
		name: 'nodata',
		props:{
			config:{
				type:Object,
				default:function(){
					return{
					}
				}
			},
		},
		data() {
			return {
			
				conf:{
						type:'1',
						top:22,
						imgWidth:0,
						imgHeight:0,
						imgUrl:'',
						content:'暂无数据~',
						fSize:30,
						color:'#B3B3B3',
						txtTop:20,
						url: this.$mConfig.staticUrl,
						
					}
			}
		},
		created() {
			this.init();
		},
		methods: {
			init(){
				this.conf = Object.assign(this.conf, this.config);
			}
		}
	}
</script>

<style scoped>
	.no-data-view{
		text-align: center;
	}
	.no-data{
		width: 475rpx;
		height: 335rpx;
	}
	
</style>
